package com.word.app.pojo.dto;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@ApiModel(value="分页请求", description = "分页请求")
public class PagingReq<T> {
    @ApiModelProperty(value = "页数", required = true)
    private Integer current;

    @ApiModelProperty(value = "条数", required = true)
    private Integer size;

    private T params;

    @ApiModelProperty(hidden = true)
    public Page getPage(){
        return new Page<>(current, size);
    }
}
